﻿ 

@using MvcApplication4.Models;
@model IEnumerable<Student>
@{
    ViewBag.Title = "ServerMode";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>ServerMode</h2>
<br /><br />

<div class="sample-panel-margin" style="width: 95%;">
    @(Html.Syncfusion().Grid<Student>("GenericListGrid")
    .Datasource(Model)
    .Caption("Student Details")
    .EnablePaging()
    .EnableSorting()
    .EnableFiltering()
    .Column(cols =>
    {
        cols.Add(c => c.UniversityCode).HeaderText("University Code").TextAlign(Syncfusion.Mvc.Grid.TextAlignment.Right).Width(110);
        cols.Add(c => c.Title).HeaderText("Title");
        cols.Add(c => c.Duration).HeaderText("Duration").TextAlign(Syncfusion.Mvc.Grid.TextAlignment.Right).Width(80);
        cols.Add(c => c.CourseFees).HeaderText("Course Fees").TextAlign(Syncfusion.Mvc.Grid.TextAlignment.Right).Format("{0:C}").Width(90);
        cols.Add(c => c.CGPA).HeaderText("CGPA").TextAlign(Syncfusion.Mvc.Grid.TextAlignment.Right).Width(80).Format("{0:P}");
    }))
</div>
